package view.clock_panel;

import java.awt.Font;

import javax.swing.JTextField;

import listener.TimeChangeEvent;
import listener.TimeChangeListener;

public class DisplayClock extends JTextField implements TimeChangeListener {
	private static final long serialVersionUID = 5908191500937761826L;
	
	public DisplayClock() {
		super("00");
		
		setHorizontalAlignment(JTextField.CENTER);
		setFont(new Font(Font.DIALOG_INPUT, Font.BOLD, 32));
	}

	public void timeChange(TimeChangeEvent e) {
		setText(e.getSource() + "");
	}
}
